<?php
require_once(dirname(__FILE__).'/../lib/site_example.php');

$loginUrl = Url::local(Config::get('userLoginUrl', 'user/login.php'));
$registerUrl = Url::local(Config::get('userRegisterUrl', 'user/register.php'));
$forgotPasswordUrl = Url::local(Config::get('userForgotPasswordUrl', 'user/forgot-password.php'));

$loginPage = <<<EOF
<h1>Login</h1>
<p>Please enter your login information.</p>
<form class="quibbox_form quibbox_login_form" action="$loginUrl" method="post">
	<input type="hidden" name="redirect" value="$redirect"/>
	<div class="required">
		<label for="username">Username:</label> <input name="username">
	</div>
	<div class="required">
		<label for="password">Password:</label> <input name="password" type="password">
	</div>
	<div class="no_label enter">
		<input value="Login" type="submit">
	</div>
	<div class="links">
		<a href="$registerUrl" class="register">Register</a> &bull; <a href="$forgotPasswordUrl" class="forgot-password">Forgot Password?</a>
	</div>
</form>
EOF;
Page::withContent($loginPage);
?>